package lesson;

import java.util.Scanner;

public class n5 {
	public static void main(String[] args) {
		Scanner scanner=new Scanner(System.in);
		 int []a={9,2,5,7,8};
		 int a1=a[0];
		 int b1=a[1];
		 int c1=a[3];
		 for (int i = 0; i < a.length; i++) {
			 a[0]=a[4];
			 a[1]=c1;
			 a[4]=a1;
			 a[3]=b1;
			
		}
		 for (int i = 0; i < a.length; i++) {
				 System.out.println(a[i]);
		}
	}
}
